package com.znufe.exam.viewmodel.admin.lecturertitle;

import com.znufe.exam.domain.LecturerTitle;
import com.znufe.exam.utility.DateTimeUtil;
import com.znufe.exam.viewmodel.BaseVM;
import lombok.Data;

@Data
public class LecturerTitlePageResponseVm extends BaseVM {
    private Integer id;

    private String titleName;

    private Integer status;

    private String gmtCreate;

    public static LecturerTitlePageResponseVm from(LecturerTitle lecturerTitle){
        LecturerTitlePageResponseVm vm = modelMapper.map(lecturerTitle,LecturerTitlePageResponseVm.class);
        vm.setGmtCreate(DateTimeUtil.dateFormat(lecturerTitle.getGmtCreate()));
        return vm;
    }
}
